const express = require('express')
const router = express.Router()

const departmentController = require(process.cwd() +'/controllers/departmentControllers');

// 获取所有部门
router.get('/getAllDepartments', departmentController.getAllDepartments);

// 添加部门
router.post('/addDepartments', departmentController.addDepartment);

// 添加一个子部门
router.post('/createChild/:parentId', departmentController.createChildDepartment);

router.post('/getDepartmentUser', departmentController.getDepartmentAndUsers);

// 更新部门基础信息
router.put('/updateDpeartmentInfo/:departmentId',departmentController.updateDepartmentInfo)
module.exports = router
